home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Communications / pop3d / RFC1225 < prev   
Text File  |  1993-01-03  |  36KB  |  899 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                            M. Rose
  8. Request for Comments: 1225             Performance Systems International
  9. Obsoletes: RFC 1081                                             May 1991
  10.  
  11.  
  12.                     Post Office Protocol - Version 3
  13.  
  14. Status of this Memo
  15.  
  16.    This memo suggests a simple method for workstations to dynamically
  17.    access mail from a mailbox server.  This RFC specifies an IAB
  18.    standards track protocol for the Internet community, and requests
  19.    discussion and suggestions for improvements.  Please refer to the
  20.    current edition of the "IAB Official Protocol Standards" for the
  21.    standardization state and status of this protocol.  Distribution of
  22.    this memo is unlimited.
  23.  
  24. Overview
  25.  
  26.    This memo is a republication of RFC 1081 which was based on RFC 918
  27.    (since revised as RFC 937).  Although similar in form to the original
  28.    Post Office Protocol (POP) proposed for the Internet community, the
  29.    protocol discussed in this memo is similar in spirit to the ideas
  30.    investigated by the MZnet project at the University of California,
  31.    Irvine.
  32.  
  33.    Further, substantial work was done on examining POP in a PC-based
  34.    environment.  This work, which resulted in additional functionality
  35.    in this protocol, was performed by the ACIS Networking Systems Group
  36.    at Stanford University.  The author gratefully acknowledges their
  37.    interest.
  38.  
  39. Introduction
  40.  
  41.    On certain types of smaller nodes in the Internet it is often
  42.    impractical to maintain a message transport system (MTS).  For
  43.    example, a workstation may not have sufficient resources (cycles,
  44.    disk space) in order to permit a SMTP server and associated local
  45.    mail delivery system to be kept resident and continuously running.
  46.    Similarly, it may be expensive (or impossible) to keep a personal
  47.    computer interconnected to an IP-style network for long amounts of
  48.    time (the node is lacking the resource known as "connectivity").
  49.  
  50.    Despite this, it is often very useful to be able to manage mail on
  51.    these smaller nodes, and they often support a user agent (UA) to aid
  52.    the tasks of mail handling.  To solve this problem, a node which can
  53.    support an MTS entity offers a maildrop service to these less endowed
  54.    nodes.  The Post Office Protocol - Version 3 (POP3) is intended to
  55.  
  56.  
  57.  
  58. Rose                                                            [Page 1]
  59.  
  60. RFC 1225                          POP3                          May 1991
  61.  
  62.  
  63.    permit a workstation to dynamically access a maildrop on a server
  64.    host in a useful fashion.  Usually, this means that the POP3 is used
  65.    to allow a workstation to retrieve mail that the server is holding
  66.    for it.
  67.  
  68.    For the remainder of this memo, the term "client host" refers to a
  69.    host making use of the POP3 service, while the term "server host"
  70.    refers to a host which offers the POP3 service.
  71.  
  72. A Short Digression
  73.  
  74.    This memo does not specify how a client host enters mail into the
  75.    transport system, although a method consistent with the philosophy of
  76.    this memo is presented here:
  77.  
  78.       When the user agent on a client host wishes to enter a message
  79.       into the transport system, it establishes an SMTP connection to
  80.       its relay host (this relay host could be, but need not be, the
  81.       POP3 server host for the client host).
  82.  
  83.    If this method is followed, then the client host appears to the MTS
  84.    as a user agent, and should NOT be regarded as a "trusted" MTS entity
  85.    in any sense whatsoever.  This concept, along with the role of the
  86.    POP3 as a part of a split-UA model is discussed later in this memo.
  87.  
  88.    Initially, the server host starts the POP3 service by listening on
  89.    TCP port 110.  When a client host wishes to make use of the service,
  90.    it establishes a TCP connection with the server host.  When the
  91.    connection is established, the POP3 server sends a greeting.  The
  92.    client and POP3 server then exchange commands and responses
  93.    (respectively) until the connection is closed or aborted.
  94.  
  95.    Commands in the POP3 consist of a keyword possibly followed by an
  96.    argument.  All commands are terminated by a CRLF pair.
  97.  
  98.    Responses in the POP3 consist of a success indicator and a keyword
  99.    possibly followed by additional information.  All responses are
  100.    terminated by a CRLF pair.  There are currently two success
  101.    indicators: positive ("+OK") and negative ("-ERR").
  102.  
  103.    Responses to certain commands are multi-line.  In these cases, which
  104.    are clearly indicated below, after sending the first line of the
  105.    response and a CRLF, any additional lines are sent, each terminated
  106.    by a CRLF pair.  When all lines of the response have been sent, a
  107.    final line is sent, consisting of a termination octet (decimal code
  108.    046, ".") and a CRLF pair.  If any line of the multi-line response
  109.    begins with the termination octet, the line is "byte-stuffed" by
  110.    pre-pending the termination octet to that line of the response.
  111.  
  112.  
  113.  
  114. Rose                                                            [Page 2]
  115.  
  116. RFC 1225                          POP3                          May 1991
  117.  
  118.  
  119.    Hence a multi-line response is terminated with the five octets
  120.    "CRLF.CRLF".  When examining a multi-line response, the client checks
  121.    to see if the line begins with the termination octet.  If so and if
  122.    octets other than CRLF follow, the the first octet of the line (the
  123.    termination octet) is stripped away.  If so and if CRLF immediately
  124.    follows the termination character, then the response from the POP
  125.    server is ended and the line containing ".CRLF" is not considered
  126.    part of the multi-line response.
  127.  
  128.    A POP3 session progresses through a number of states during its
  129.    lifetime.  Once the TCP connection has been opened and the POP3
  130.    server has sent the greeting, the session enters the AUTHORIZATION
  131.    state.  In this state, the client must identify itself to the POP3
  132.    server.  Once the client has successfully done this, the server
  133.    acquires resources associated with the client's maildrop, and the
  134.    session enters the TRANSACTION state.  In this state, the client
  135.    requests actions on the part of the POP3 server.  When the client has
  136.    finished its transactions, the session enters the UPDATE state.  In
  137.    this state, the POP3 server releases any resources acquired during
  138.    the TRANSACTION state and says goodbye.  The TCP connection is then
  139.    closed.
  140.  
  141. The AUTHORIZATION State
  142.  
  143.    Once the TCP connection has been opened by a POP3 client, the POP3
  144.    server issues a one line greeting.  This can be any string terminated
  145.    by CRLF.  An example might be:
  146.  
  147.       S.  +OK dewey POP3 server ready (Comments to: PostMaster@UDEL.EDU)
  148.  
  149.    Note that this greeting is a POP3 reply.  The POP3 server should
  150.    always give a positive response as the greeting.
  151.  
  152.    The POP3 session is now in the AUTHORIZATION state.  The client must
  153.    now issue the USER command.  If the POP3 server responds with a
  154.    positive success indicator ("+OK"), then the client may issue either
  155.    the PASS command to complete the authorization, or the QUIT command
  156.    to terminate the POP3 session.  If the POP3 server responds with a
  157.    negative success indicator ("-ERR") to the USER command, then the
  158.    client may either issue a new USER command or may issue the QUIT
  159.    command.
  160.  
  161.    When the client issues the PASS command, the POP3 server uses the
  162.    argument pair from the USER and PASS commands to determine if the
  163.    client should be given access to the appropriate maildrop.  If so,
  164.    the POP3 server then acquires an exclusive-access lock on the
  165.    maildrop.  If the lock is successfully acquired, the POP3 server
  166.    parses the maildrop into individual messages (read note below),
  167.  
  168.  
  169.  
  170. Rose                                                            [Page 3]
  171.  
  172. RFC 1225                          POP3                          May 1991
  173.  
  174.  
  175.    determines the last message (if any) present in the maildrop that was
  176.    referenced by the RETR command, and responds with a positive success
  177.    indicator.  The POP3 session now enters the TRANSACTION state.  If
  178.    the lock can not be acquired or the client should is denied access to
  179.    the appropriate maildrop or the maildrop can't be parsed for some
  180.    reason, the POP3 server responds with a negative success indicator.
  181.    (If a lock was acquired but the POP3 server intends to respond with a
  182.    negative success indicator, the POP3 server must release the lock
  183.    prior to rejecting the command.)  At this point, the client may
  184.    either issue a new USER command and start again, or the client may
  185.    issue the QUIT command.
  186.  
  187.                  NOTE: Minimal implementations of the POP3 need only be
  188.                  able to break a maildrop into its component messages;
  189.                  they need NOT be able to parse individual messages.
  190.                  More advanced implementations may wish to have this
  191.                  capability, for reasons discussed later.
  192.  
  193.    After the POP3 server has parsed the maildrop into individual
  194.    messages, it assigns a message-id to each message, and notes the size
  195.    of the message in octets.  The first message in the maildrop is
  196.    assigned a message-id of "1", the second is assigned "2", and so on,
  197.    so that the n'th message in a maildrop is assigned a message-id of
  198.    "n".  In POP3 commands and responses, all message-id's and message
  199.    sizes are expressed in base-10 (i.e., decimal).
  200.  
  201.    It sets the "highest number accessed" to be that of the last message
  202.    referenced by the RETR command.
  203.  
  204.    Here are summaries for the three POP3 commands discussed thus far:
  205.  
  206.            USER name
  207.                Arguments: a server specific user-id (required)
  208.                Restrictions: may only be given in the AUTHORIZATION
  209.                    state after the POP3 greeting or after an
  210.                    unsuccessful USER or PASS command
  211.                Possible Responses:
  212.                    +OK name is welcome here
  213.                    -ERR never heard of name
  214.                Examples:
  215.                    C:    USER mrose
  216.                    S:    +OK mrose is a real hoopy frood
  217.                      ...
  218.                    C:    USER frated
  219.                    S:    -ERR sorry, frated doesn't get his mail here
  220.  
  221.            PASS string
  222.                Arguments: a server/user-id specific password (required)
  223.  
  224.  
  225.  
  226. Rose                                                            [Page 4]
  227.  
  228. RFC 1225                          POP3                          May 1991
  229.  
  230.  
  231.                Restrictions: may only be given in the AUTHORIZATION
  232.                    state after a successful USER command
  233.                Possible Responses:
  234.                    +OK maildrop locked and ready
  235.                    -ERR invalid password
  236.                    -ERR unable to lock maildrop
  237.                Examples:
  238.                    C:    USER mrose
  239.                    S:    +OK mrose is a real hoopy frood
  240.                    C:    PASS secret
  241.                    S:    +OK mrose's maildrop has 2 messages
  242.                          (320 octets)
  243.                      ...
  244.                    C:    USER mrose
  245.                    S:    +OK mrose is a real hoopy frood
  246.                    C:    PASS secret
  247.                    S:    -ERR unable to lock mrose's maildrop, file
  248.                          already locked
  249.  
  250.            QUIT
  251.                Arguments: none
  252.                Restrictions: none
  253.                Possible Responses:
  254.                    +OK
  255.                Examples:
  256.                    C:    QUIT
  257.                    S:    +OK dewey POP3 server signing off
  258.  
  259.  
  260. The TRANSACTION State
  261.  
  262.    Once the client has successfully identified itself to the POP3 server
  263.    and the POP3 server has locked and burst the appropriate maildrop,
  264.    the POP3 session is now in the TRANSACTION state.  The client may now
  265.    issue any of the following POP3 commands repeatedly.  After each
  266.    command, the POP3 server issues a response.  Eventually, the client
  267.    issues the QUIT command and the POP3 session enters the UPDATE state.
  268.  
  269.    Here are the POP3 commands valid in the TRANSACTION state:
  270.  
  271.            STAT
  272.                Arguments: none
  273.                Restrictions: may only be given in the TRANSACTION state.
  274.                Discussion:
  275.  
  276.                  The POP3 server issues a positive response with a line
  277.                  containing information for the maildrop.  This line is
  278.                  called a "drop listing" for that maildrop.
  279.  
  280.  
  281.  
  282. Rose                                                            [Page 5]
  283.  
  284. RFC 1225                          POP3                          May 1991
  285.  
  286.  
  287.                  In order to simplify parsing, all POP3 servers are
  288.                  required to use a certain format for drop listings.
  289.                  The first octets present must indicate the number of
  290.                  messages in the maildrop.  Following this is the size
  291.                  of the maildrop in octets.  This memo makes no
  292.                  requirement on what follows the maildrop size.
  293.                  Minimal implementations should just end that line of
  294.                  the response with a CRLF pair.  More advanced
  295.                  implementations may include other information.
  296.  
  297.                       NOTE: This memo STRONGLY discourages
  298.                       implementations from supplying additional
  299.                       information in the drop listing.  Other,
  300.                       optional, facilities are discussed later on
  301.                       which permit the client to parse the messages
  302.                       in the maildrop.
  303.  
  304.                  Note that messages marked as deleted are not counted in
  305.                  either total.
  306.  
  307.                Possible Responses:
  308.                    +OK nn mm
  309.                Examples:
  310.                    C:    STAT
  311.                    S:    +OK 2 320
  312.  
  313.            LIST [msg]
  314.                Arguments: a message-id (optionally)  If a message-id is
  315.                    given, it may NOT refer to a message marked as
  316.                    deleted.
  317.                Restrictions: may only be given in the TRANSACTION state.
  318.                Discussion:
  319.  
  320.                  If an argument was given and the POP3 server issues a
  321.                  positive response with a line containing information
  322.                  for that message.  This line is called a "scan listing"
  323.                  for that message.
  324.  
  325.                  If no argument was given and the POP3 server issues a
  326.                  positive response, then the response given is
  327.                  multi-line.  After the initial +OK, for each message
  328.                  in the maildrop, the POP3 server responds with a line
  329.                  containing information for that message.  This line
  330.                  is called a "scan listing" for that message.
  331.  
  332.                  In order to simplify parsing, all POP3 servers are
  333.                  required to use a certain format for scan listings.
  334.                  The first octets present must be the message-id of
  335.  
  336.  
  337.  
  338. Rose                                                            [Page 6]
  339.  
  340. RFC 1225                          POP3                          May 1991
  341.  
  342.  
  343.                  the message.  Following the message-id is the size of
  344.                  the message in octets.  This memo makes no requirement
  345.                  on what follows the message size in the scan listing.
  346.                  Minimal implementations should just end that line of
  347.                  the response with a CRLF pair.  More advanced
  348.                  implementations may include other information, as
  349.                  parsed from the message.
  350.  
  351.                       NOTE: This memo STRONGLY discourages
  352.                       implementations from supplying additional
  353.                       information in the scan listing.  Other, optional,
  354.                       facilities are discussed later on which permit
  355.                       the client to parse the messages in the maildrop.
  356.  
  357.                  Note that messages marked as deleted are not listed.
  358.  
  359.                Possible Responses:
  360.                    +OK scan listing follows
  361.                    -ERR no such message
  362.                Examples:
  363.                    C:    LIST
  364.                    S:    +OK 2 messages (320 octets)
  365.                    S:    1 120
  366.                    S:    2 200
  367.                    S:    .
  368.                      ...
  369.                    C:    LIST 2
  370.                    S:    +OK 2 200
  371.                      ...
  372.                    C:    LIST 3
  373.                    S:    -ERR no such message, only 2 messages in
  374.                          maildrop
  375.  
  376.            RETR msg
  377.                Arguments: a message-id (required)  This message-id may
  378.                    NOT refer to a message marked as deleted.
  379.                Restrictions: may only be given in the TRANSACTION state.
  380.                Discussion:
  381.  
  382.                  If the POP3 server issues a positive response, then the
  383.                  response given is multi-line.  After the initial +OK,
  384.                  the POP3 server sends the message corresponding to the
  385.                  given message-id, being careful to byte-stuff the
  386.                  termination character (as with all multi-line
  387.                  responses).
  388.  
  389.                  If the number associated with this message is higher
  390.                  than the "highest number accessed" in the maildrop, the
  391.  
  392.  
  393.  
  394. Rose                                                            [Page 7]
  395.  
  396. RFC 1225                          POP3                          May 1991
  397.  
  398.  
  399.                  POP3 server updates the "highest number accessed" to
  400.                  the number associated with this message.
  401.  
  402.                Possible Responses:
  403.                    +OK message follows
  404.                    -ERR no such message
  405.                Examples:
  406.                    C:    RETR 1
  407.                    S:    +OK 120 octets
  408.                    S:    <the POP3 server sends the entire message here>
  409.                    S:    .
  410.  
  411.            DELE msg
  412.                Arguments: a message-id (required)  This message-id
  413.                    may NOT refer to a message marked as deleted.
  414.                Restrictions: may only be given in the TRANSACTION state.
  415.                Discussion:
  416.  
  417.                  The POP3 server marks the message as deleted.  Any
  418.                  future reference to the message-id associated with the
  419.                  message in a POP3 command generates an error.  The POP3
  420.                  server does not actually delete the message until the
  421.                  POP3 session enters the UPDATE state.
  422.  
  423.                  If the number associated with this message is higher
  424.                  than the "highest number accessed" in the maildrop,
  425.                  the POP3 server updates the "highest number accessed"
  426.                  to the number associated with this message.
  427.  
  428.                Possible Responses:
  429.                    +OK message deleted
  430.                    -ERR no such message
  431.                Examples:
  432.                    C:    DELE 1
  433.                    S:    +OK message 1 deleted
  434.                      ...
  435.                    C:    DELE 2
  436.                    S:    -ERR message 2 already deleted
  437.  
  438.            NOOP
  439.                Arguments: none
  440.                Restrictions: may only be given in the TRANSACTION state.
  441.                Discussion:
  442.  
  443.                  The POP3 server does nothing, it merely replies with a
  444.                  positive response.
  445.  
  446.                Possible Responses:
  447.  
  448.  
  449.  
  450. Rose                                                            [Page 8]
  451.  
  452. RFC 1225                          POP3                          May 1991
  453.  
  454.  
  455.                    +OK
  456.                Examples:
  457.                    C:    NOOP
  458.                    S:    +OK
  459.  
  460.            LAST
  461.                Arguments: none
  462.                Restrictions: may only be issued in the TRANSACTION state.
  463.                Discussion:
  464.  
  465.                  The POP3 server issues a positive response with a line
  466.                  containing the highest message number which accessed.
  467.                  Zero is returned in case no message in the maildrop has
  468.                  been accessed during previous transactions.  A client
  469.                  may thereafter infer that messages, if any, numbered
  470.                  greater than the response to the LAST command are
  471.                  messages not yet accessed by the client.
  472.  
  473.              Possible Response:
  474.                    +OK nn
  475.  
  476.              Examples:
  477.                    C:      STAT
  478.                    S:      +OK 4 320
  479.                    C:      LAST
  480.                    S:      +OK 1
  481.                    C:      RETR 3
  482.                    S:      +OK 120 octets
  483.                    S:      <the POP3 server sends the entire message
  484.                            here>
  485.                    S:      .
  486.                    C:      LAST
  487.                    S:      +OK 3
  488.                    C:      DELE 2
  489.                    S:      +OK message 2 deleted
  490.                    C:      LAST
  491.                    S:      +OK 3
  492.                    C:      RSET
  493.                    S:      +OK
  494.                    C:      LAST
  495.                    S:      +OK 1
  496.  
  497.            RSET
  498.                Arguments: none
  499.                Restrictions: may only be given in the TRANSACTION
  500.                    state.
  501.                Discussion:
  502.  
  503.  
  504.  
  505.  
  506. Rose                                                            [Page 9]
  507.  
  508. RFC 1225                          POP3                          May 1991
  509.  
  510.  
  511.                  If any messages have been marked as deleted by the POP3
  512.                  server, they are unmarked.  The POP3 server then
  513.                  replies with a positive response.  In addition, the
  514.                  "highest number accessed" is also reset to the value
  515.                  determined at the beginning of the POP3 session.
  516.  
  517.                Possible Responses:
  518.                    +OK
  519.                Examples:
  520.                    C:    RSET
  521.                    S:    +OK maildrop has 2 messages (320 octets)
  522.  
  523.  
  524.  
  525. The UPDATE State
  526.  
  527.    When the client issues the QUIT command from the TRANSACTION state,
  528.    the POP3 session enters the UPDATE state.  (Note that if the client
  529.    issues the QUIT command from the AUTHORIZATION state, the POP3
  530.    session terminates but does NOT enter the UPDATE state.)
  531.  
  532.            QUIT
  533.                Arguments: none
  534.                Restrictions: none
  535.                Discussion:
  536.  
  537.                  The POP3 server removes all messages marked as deleted
  538.                  from the maildrop.  It then releases the
  539.                  exclusive-access lock on the maildrop and replies as
  540.                  to the success of
  541.                  these operations.  The TCP connection is then closed.
  542.  
  543.                Possible Responses:
  544.                    +OK
  545.                Examples:
  546.                    C:    QUIT
  547.                    S:    +OK dewey POP3 server signing off (maildrop
  548.                          empty)
  549.                      ...
  550.                    C:    QUIT
  551.                    S:    +OK dewey POP3 server signing off (2 messages
  552.                          left)
  553.                      ...
  554.  
  555.  
  556. Optional POP3 Commands
  557.  
  558.    The POP3 commands discussed above must be supported by all minimal
  559.  
  560.  
  561.  
  562. Rose                                                           [Page 10]
  563.  
  564. RFC 1225                          POP3                          May 1991
  565.  
  566.  
  567.    implementations of POP3 servers.
  568.  
  569.    The optional POP3 commands described below permit a POP3 client
  570.    greater freedom in message handling, while preserving a simple POP3
  571.    server implementation.
  572.  
  573.                  NOTE: This memo STRONGLY encourages implementations to
  574.                  support these commands in lieu of developing augmented
  575.                  drop and scan listings.  In short, the philosophy of
  576.                  this memo is to put intelligence in the part of the
  577.                  POP3 client and not the POP3 server.
  578.  
  579.            TOP msg n
  580.                Arguments: a message-id (required) and a number.  This
  581.                    message-id may NOT refer to a message marked as
  582.                    deleted.
  583.                Restrictions: may only be given in the TRANSACTION state.
  584.                Discussion:
  585.  
  586.                  If the POP3 server issues a positive response, then
  587.                  the response given is multi-line.  After the initial
  588.                  +OK, the POP3 server sends the headers of the message,
  589.                  the blank line separating the headers from the body,
  590.                  and then the number of lines indicated message's body,
  591.                  being careful to byte-stuff the termination character
  592.                  (as with all multi-line responses).
  593.  
  594.                  Note that if the number of lines requested by the POP3
  595.                  client is greater than than the number of lines in the
  596.                  body, then the POP3 server sends the entire message.
  597.  
  598.                Possible Responses:
  599.                    +OK top of message follows
  600.                    -ERR no such message
  601.                Examples:
  602.                    C:    TOP 10
  603.                    S:    +OK
  604.                    S:    <the POP3 server sends the headers of the
  605.                           message, a blank line, and the first 10 lines
  606.                           of the body of the message>
  607.                    S:    .
  608.                      ...
  609.                    C:    TOP 100
  610.                    S:    -ERR no such message
  611.  
  612.            RPOP user
  613.                Arguments: a client specific user-id (required)
  614.                Restrictions: may only be given in the AUTHORIZATION
  615.  
  616.  
  617.  
  618. Rose                                                           [Page 11]
  619.  
  620. RFC 1225                          POP3                          May 1991
  621.  
  622.  
  623.                    state after a successful USER command; in addition,
  624.                    may only be given if the client used a reserved
  625.                    (privileged) TCP port to connect to the server.
  626.                Discussion:
  627.  
  628.                  The RPOP command may be used instead of the PASS
  629.                  command to authenticate access to the maildrop.  In
  630.                  order for this command to be successful, the POP3
  631.                  client must use a reserved TCP port (port < 1024) to
  632.                  connect tothe server.  The POP3 server uses the
  633.                  argument pair from the USER and RPOP commands to
  634.                  determine if the client should be given access to
  635.                  the appropriate maildrop.  Unlike the PASS command
  636.                  however, the POP3 server considers if the remote user
  637.                  specified by the RPOP command who resides on the POP3
  638.                  client host is allowed to access the maildrop for the
  639.                  user specified by the USER command (e.g., on Berkeley
  640.                  UNIX, the .rhosts mechanism is used).  With the
  641.                  exception of this differing in authentication, this
  642.                  command is identical to the PASS command.
  643.  
  644.                  Note that the use of this feature has allowed much wider
  645.                  penetration into numerous hosts on local networks (and
  646.                  sometimes remote networks) by those who gain illegal
  647.                  access to computers by guessing passwords or otherwise
  648.                  breaking into the system.
  649.  
  650.                Possible Responses:
  651.                    +OK maildrop locked and ready
  652.                    -ERR permission denied
  653.                Examples:
  654.                    C:    USER mrose
  655.                    S:    +OK mrose is a real hoopy frood
  656.                    C:    RPOP mrose
  657.                    S:    +OK mrose's maildrop has 2 messages (320
  658.                          octets)
  659.  
  660.        Minimal POP3 Commands:
  661.            USER name               valid in the AUTHORIZATION state
  662.            PASS string
  663.            QUIT
  664.  
  665.            STAT                    valid in the TRANSACTION state
  666.            LIST [msg]
  667.            RETR msg
  668.            DELE msg
  669.            NOOP
  670.            LAST
  671.  
  672.  
  673.  
  674. Rose                                                           [Page 12]
  675.  
  676. RFC 1225                          POP3                          May 1991
  677.  
  678.  
  679.            RSET
  680.  
  681.            QUIT                    valid in the UPDATE state
  682.  
  683.        Optional POP3 Commands:
  684.            RPOP user               valid in the AUTHORIZATION state
  685.  
  686.            TOP msg n               valid in the TRANSACTION state
  687.  
  688.        POP3 Replies:
  689.            +OK
  690.            -ERR
  691.  
  692.        Note that with the exception of the STAT command, the reply given
  693.        by the POP3 server to any command is significant only to "+OK"
  694.        and "-ERR".  Any text occurring after this reply may be ignored
  695.        by the client.
  696.  
  697. Example POP3 Session
  698.  
  699.     S: <wait for connection on TCP port 110>
  700.         ...
  701.     C: <open connection>
  702.     S:    +OK dewey POP3 server ready (Comments to: PostMaster@UDEL.EDU)
  703.     C:    USER mrose
  704.     S:    +OK mrose is a real hoopy frood
  705.     C:    PASS secret
  706.     S:    +OK mrose's maildrop has 2 messages (320 octets)
  707.     C:    STAT
  708.     S:    +OK 2 320
  709.     C:    LIST
  710.     S:    +OK 2 messages (320 octets)
  711.     S:    1 120
  712.     S:    2 200
  713.     S:    .
  714.     C:    RETR 1
  715.     S:    +OK 120 octets
  716.     S:    <the POP3 server sends message 1>
  717.     S:    .
  718.     C:    DELE 1
  719.     S:    +OK message 1 deleted
  720.     C:    RETR 2
  721.     S:    +OK 200 octets
  722.     S:    <the POP3 server sends message 2>
  723.     S:    .
  724.     C:    DELE 2
  725.     S:    +OK message 2 deleted
  726.     C:    QUIT
  727.  
  728.  
  729.  
  730. Rose                                                           [Page 13]
  731.  
  732. RFC 1225                          POP3                          May 1991
  733.  
  734.  
  735.     S:    +OK dewey POP3 server signing off (maildrop empty)
  736.     C:  <close connection>
  737.     S:  <wait for next connection>
  738.  
  739. Message Format
  740.  
  741.    All messages transmitted during a POP3 session are assumed to conform
  742.    to the standard for the format of Internet text messages [RFC822].
  743.  
  744.    It is important to note that the byte count for a message on the
  745.    server host may differ from the octet count assigned to that message
  746.    due to local conventions for designating end-of-line.  Usually,
  747.    during the AUTHORIZATION state of the POP3 session, the POP3 client
  748.    can calculate the size of each message in octets when it parses the
  749.    maildrop into messages.  For example, if the POP3 server host
  750.    internally represents end-of-line as a single character, then the
  751.    POP3 server simply counts each occurrence of this character in a
  752.    message as two octets.  Note that lines in the message which start
  753.    with the termination octet need not be counted twice, since the POP3
  754.    client will remove all byte-stuffed termination characters when it
  755.    receives a multi-line response.
  756.  
  757. The POP and the Split-UA model
  758.  
  759.    The underlying paradigm in which the POP3 functions is that of a
  760.    split-UA model.  The POP3 client host, being a remote PC based
  761.    workstation, acts solely as a client to the message transport system.
  762.    It does not provide delivery/authentication services to others.
  763.    Hence, it is acting as a UA, on behalf of the person using the
  764.    workstation.  Furthermore, the workstation uses SMTP to enter mail
  765.    into the MTS.
  766.  
  767.    In this sense, we have two UA functions which interface to the
  768.    message transport system: Posting (SMTP) and Retrieval (POP3).  The
  769.    entity which supports this type of environment is called a split-UA
  770.    (since the user agent is split between two hosts which must
  771.    interoperate to provide these functions).
  772.  
  773.                  ASIDE:  Others might term this a remote-UA instead.
  774.                  There are arguments supporting the use of both terms.
  775.  
  776.    This memo has explicitly referenced TCP as the underlying transport
  777.    agent for the POP3.  This need not be the case.  In the MZnet split-
  778.    UA, for example, personal micro-computer systems are used which do
  779.    not have IP-style networking capability.  To connect to the POP3
  780.    server host, a PC establishes a terminal connection using some simple
  781.    protocol (PhoneNet).  A program on the PC drives the connection,
  782.    first establishing a login session as a normal user.  The login shell
  783.  
  784.  
  785.  
  786. Rose                                                           [Page 14]
  787.  
  788. RFC 1225                          POP3                          May 1991
  789.  
  790.  
  791.    for this pseudo-user is a program which drives the other half of the
  792.    terminal protocol and communicates with one of two servers.  Although
  793.    MZnet can support several PCs, a single pseudo-user login is present
  794.    on the server host.  The user-id and password for this pseudo-user
  795.    login is known to all members of MZnet.  Hence, the first action of
  796.    the login shell, after starting the terminal protocol, is to demand a
  797.    USER/PASS authorization pair from the PC.  This second level of
  798.    authorization is used to ascertain who is interacting with the MTS.
  799.    Although the server host is deemed to support a "trusted" MTS entity,
  800.    PCs in MZnet are not.  Naturally, the USER/PASS authorization pair
  801.    for a PC is known only to the owner of the PC (in theory, at least).
  802.  
  803.    After successfully verifying the identity of the client, a modified
  804.    SMTP server is started, and the PC posts mail with the server host.
  805.    After the QUIT command is given to the SMTP server and it terminates,
  806.    a modified POP3 server is started, and the PC retrieves mail from the
  807.    server host.  After the QUIT command is given to the POP3 server and
  808.    it terminates, the login shell for the pseudo-user terminates the
  809.    terminal protocol and logs the job out.  The PC then closes the
  810.    terminal connection to the server host.
  811.  
  812.    The SMTP server used by MZnet is modified in the sense that it knows
  813.    that it's talking to a user agent and not a "trusted" entity in the
  814.    message transport system.  Hence, it does performs the validation
  815.    activities normally performed by an entity in the MTS when it accepts
  816.    a message from a UA.
  817.  
  818.    The POP3 server used by MZnet is modified in the sense that it does
  819.    not require a USER/PASS combination before entering the TRANSACTION
  820.    state.  The reason for this (of course) is that the PC has already
  821.    identified itself during the second-level authorization step
  822.    described above.
  823.  
  824.                  NOTE: Truth in advertising laws require that the author
  825.                  of this memo state that MZnet has not actually been
  826.                  fully implemented.  The concepts presented and proven
  827.                  by the project led to the notion of the MZnet
  828.                  split-slot model.  This notion has inspired the
  829.                  split-UA concept described in this memo, led to the
  830.                  author's interest in the POP, and heavily influenced
  831.                  the the description of the POP3 herein.
  832.  
  833.    In fact, some UAs present in the Internet already support the notion
  834.    of posting directly to an SMTP server and retrieving mail directly
  835.    from a POP server, even if the POP server and client resided on the
  836.    same host!
  837.  
  838.                  ASIDE: this discussion raises an issue which this memo
  839.  
  840.  
  841.  
  842. Rose                                                           [Page 15]
  843.  
  844. RFC 1225                          POP3                          May 1991
  845.  
  846.  
  847.                  purposedly avoids: how does SMTP know that it's talking
  848.                  to a "trusted" MTS entity?
  849.  
  850. References
  851.  
  852.      [MZnet]   Stefferud, E., J. Sweet, and T. Domae, "MZnet: Mail
  853.                Service for Personal Micro-Computer Systems",
  854.                Proceedings, IFIP 6.5 International Conference on
  855.                Computer Message Systems, Nottingham, U.K., May 1984.
  856.  
  857.      [RFC821]  Postel, J., "Simple Mail Transfer Protocol",
  858.                USC/Information Sciences Institute, August 1982.
  859.  
  860.      [RFC822]  Crocker, D., "Standard for the Format of ARPA-Internet
  861.                Text Messages", University of Delaware, August 1982.
  862.  
  863.      [RFC937]  Butler, M., J. Postel, D. Chase, J. Goldberger, and J.
  864.                Reynolds, "Post Office Protocol - Version 2", RFC 937,
  865.                USC/Information Sciences Institute, February 1985.
  866.  
  867.      [RFC1060] Reynolds, J., and J. Postel, "Assigned Numbers", RFC
  868.                1060, USC/Information Sciences Institute, March 1990.
  869.  
  870. Security Considerations
  871.  
  872.    Security issues are not discussed in this memo.
  873.  
  874. Author's Address:
  875.  
  876.    Marshall T. Rose
  877.    Performance Systems International
  878.    5201 Great America Parkway
  879.    Suite 3106
  880.    Santa Clara, CA  95054
  881.  
  882.    Phone: +1 408 562 6222
  883.  
  884.    EMail: mrose@psi.com
  885.    X.500:  rose, psi, us
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898. Rose                                                           [Page 16]
  899.